package com.zbj.homemade.spring.utils;

/**
 * @program: principle
 * @description:
 * @author: Yinn
 * @create: 2019-01-11 14:04
 **/
public class NameUtil {

    public static String getLikeBeanName(Class<?> cls){
        return toLowerCaseFirstOne(cls.getSimpleName());
    }

    //首字母转小写
    public static String toLowerCaseFirstOne(String s){
        if(Character.isLowerCase(s.charAt(0)))
            return s;
        else
            return (new StringBuilder()).append(Character.toLowerCase(s.charAt(0))).append(s.substring(1)).toString();
    }

    public static void main(String args[]){

        String str = "QWERTYUI";

        System.out.println(NameUtil.class.getName());

    }
}
